home *** CD-ROM | disk | FTP | other *** search
Java Source | 1996-10-18 | 1.1 KB | 81 lines |
- // "Simple Blur Effect" with one blur object
-
- // created by ask@krc.sony.co.jp (Masamichi zzzcat Asukai)
-
- //
-
- // Copyright(C) 1996 Sony Corporation. All rights reserved.
-
- //
-
-
-
- import vrml.*;
-
- import vrml.node.*;
-
- import vrml.field.*;
-
-
-
- public class blur extends Script {
-
-
-
- private SFVec3f setTranslation;
-
-
-
- private float[] translation = new float[3];
-
-
-
- private Node realobj;
-
-
-
- // constructor
-
- public void initialize() {
-
- setTranslation = (SFVec3f)getEventOut("setTranslation");
-
-
-
- realobj = (Node)((SFNode)getField("realobj")).getValue();
-
-
-
- // get translation of real object
-
- ((SFVec3f)realobj.getExposedField("translation")).getValue(translation);
-
- }
-
-
-
- public void processEvent(Event e) {
-
- if (e.getName().equals("interval")) {
-
- // set translation of blur object
-
- setTranslation.setValue(translation);
-
-
-
- // get translation of real object
-
- ((SFVec3f)realobj.getExposedField("translation")).getValue(translation);
-
- }
-
- }
-
- }
-
-
-
-
-
-